package cate.game.role.res.guild.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdGuild;

@ClientMsg(title = "公会详情的请求")
public class GuildDetailReq implements MsgInput {
    @Override
    public MsgConfig conf() {
        return MsgIdGuild.GUILD_DETAIL_REQ;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        if (!cc.getRole().getRes().guild.checkGuild().ok()) {
            game.notice.message(cc.getRole(),310450,"尚未加入公会");
            return;
        }
        cc.getRole().getRes().guild.getGuild().noticeUpdate(cc.getRole());
    }
}
